import Vue from 'vue'
import VueRouter from 'vue-router'
// 导入子组件
// @指项目中src文件夹
// node中包文件查找机制，自动查找文件夹中index
import Reg from '@/views/reg/index.vue'
import Login from '../views/login/index.vue'
// 导入主页main.vue
import main from '../views/main/index.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    component: main
  },
  {
    path: '/Reg',
    component: Reg
  },
  {
    path: '/login',
    component: Login
  }

]

const router = new VueRouter({
  routes
})

export default router
